package com.platform.qujia.dao;


import com.platform.qujia.pojo.CustomerCardSettingDetail;
import com.platform.qujia.pojo.CustomerCardSettingDetailContent;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.math.BigDecimal;
import java.util.List;

/**
 * (CustomerCardSettingDetailContent)表数据库访问层
 *
 * @author makejava
 * @since 2023-09-11 10:38:15
 */
public interface CustomerCardSettingDetailContentMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param ccsdcId 主键
     * @return 实例对象
     */
    CustomerCardSettingDetailContent queryById(Long ccsdcId);

    /**
     * 查询指定行数据
     *
     * @param customerCardSettingDetailContent 查询条件
     * @param pageable         分页对象
     * @return 对象列表
     */
    List<CustomerCardSettingDetailContent> queryAllByLimit(CustomerCardSettingDetailContent customerCardSettingDetailContent, @Param("pageable") Pageable pageable);

    /**
     * 统计总行数
     *
     * @param customerCardSettingDetailContent 查询条件
     * @return 总行数
     */
    long count(CustomerCardSettingDetailContent customerCardSettingDetailContent);

    /**
     * 新增数据
     *
     * @param customerCardSettingDetailContent 实例对象
     * @return 影响行数
     */
    int insert(CustomerCardSettingDetailContent customerCardSettingDetailContent);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<CustomerCardSettingDetailContent> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<CustomerCardSettingDetailContent> entities);

    /**
     * 批量新增或按主键更新数据（MyBatis原生foreach方法）
     *
     * @param entities List<CustomerCardSettingDetailContent> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常，请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<CustomerCardSettingDetailContent> entities);

    /**
     * 修改数据
     *
     * @param customerCardSettingDetailContent 实例对象
     * @return 影响行数
     */
    int update(CustomerCardSettingDetailContent customerCardSettingDetailContent);

    /**
     * 通过主键删除数据
     *
     * @param ccsdcId 主键
     * @return 影响行数
     */
    int deleteById(Long ccsdcId);

    int updateByCcsdId(CustomerCardSettingDetailContent customerCardSettingDetailContent);

    List<CustomerCardSettingDetailContent> query(CustomerCardSettingDetailContent customerCardSettingDetailContent);

    List<CustomerCardSettingDetailContent> queryListByCcsdIdsBetweenAmt(@Param("ccsdIds") List<Integer> ccsdIds, @Param("amt") BigDecimal amt);

    List<CustomerCardSettingDetailContent> queryListByCcsdIds(@Param("ccsdIds") List<Integer> ccsdIds);

    CustomerCardSettingDetailContent selectMatchFirstDetailContent(CustomerCardSettingDetail form);

}

